import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:umeng_apm_sdk/umeng_apm_sdk.dart';
import 'package:sports_new/entity/other/pagging_data.dart';
import 'package:sports_new/entity/match/expert_views_entity.dart';
import 'package:sports_new/entity/my/my_focus_entity.dart';

class ExpertAllLogic extends GetxController
    with GetSingleTickerProviderStateMixin {
  final ScrollController _scrollController = ApmScrollController();
  final List<PagingData> _pages =
      List.generate(2, (index) => PagingData<List<PlanEntity>?>([], 1, 15));
  late final tabController =
      TabController(length: 2, vsync: this, initialIndex: Get.arguments ?? 0);
  int _tabIndex = 0;
  final EasyRefreshController _easyRefreshController =
      EasyRefreshController(controlFinishLoad: true);
  bool _isLoading = true;
  List<MyFocusEntity>? _focusList;
  List<List<bool>> _isFocus = [[], []];

  bool get isLoading => _isLoading;
  List<List<bool>> get isFocus => _isFocus;
  List<PagingData> get pages => _pages;
  EasyRefreshController get easyRefreshController => _easyRefreshController;
  List<MyFocusEntity>? get focusList => _focusList;
  ScrollController get scrollController => _scrollController;
  int get tabIndex => _tabIndex;

  // set tabIndex(int value) {
  //   _tabIndex = value;
  //   update();
  // }

  @override
  void onInit() {
    // tabController.addListener(() {
    //   _tabIndex = tabController.index;
    // });
    super.onInit();
  }

  @override
  void onReady() async {}
}
